﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using EKETEAM.FrameWork;
using EKETEAM.Data;

namespace EKECMS.Phone
{
    public partial class Case : System.Web.UI.Page
    {
        public string nr = "";
        public eSiteInfo siteinfo = new eSiteInfo();
        public string bigimg = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            Pub.checkPhone(); //不是手机、ipod 访问则跳转到PC版

            #region 安全性检查
            if (Request.QueryString["id"] == null) Response.Redirect("Default.aspx", true);
            string id = Request.QueryString["id"].ToString();
            #endregion
            ((EKECMS.Master.Phone)Master).SiteInfo = siteinfo;



            nr = Pub.getContent(siteinfo.Data["xxnr"].ToString());

            eBase.DataBase.Execute("update eWeb_Cass set ckcs=ckcs+1 where PictureID=" + id);


            DataTable tb = eBase.DataBase.getDataTable("select bt,jj,xtp,dtp from " + Pub.getTablePrefix() + "CaseItems where CaseID=" + id + " and delTag=0 order by case when px = 0 then 50000 else px end,CaseItemID");
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < tb.Rows.Count; i++)
            {

                sb.Append("<img src=\"../" + tb.Rows[i]["dtp"].ToString() + "\" alt=\"" + tb.Rows[i]["bt"].ToString() + "\" /><br>\r\n");

            }
            bigimg = sb.ToString();

        }
    }
}